/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.zhaojiu.service.dto;

import lombok.Data;
import me.zhengjie.base.BaseDTO;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.zhaojiu.domain.enumeration.CheckInStatus;

import java.sql.Timestamp;
import java.io.Serializable;
import java.util.Objects;

/**
* @website https://el-admin.vip
* @description /
* @author Jiayin Wei
* @date 2021-12-09
**/
@Data
public class AttendanceDetailDto extends BaseDTO implements Serializable {

    /** 考勤明细ID */
    private Long attDetialId;

    /** 考勤ID */
    private Long attendanceId;

    /** 学生ID */
    private Long studentId;

    /** 学生 */
    private StudentSmallDto student;

    /** 是否签到（0：缺勤，1：请假，2：正常） */
    private CheckInStatus isCheckIn;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AttendanceDetailDto attDetialDto = (AttendanceDetailDto) o;
        return Objects.equals(attDetialId, attDetialDto.attDetialId) &&
                Objects.equals(attendanceId, attDetialDto.attendanceId) &&
                Objects.equals(studentId, attDetialDto.studentId) &&
                Objects.equals(isCheckIn, attDetialDto.isCheckIn);
    }

    @Override
    public int hashCode() {
        return Objects.hash(attDetialId, attendanceId, studentId, isCheckIn);
    }
}
